package com.huaweicloud.sdk.sa.v1.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.time.OffsetDateTime;
import java.util.Objects;

/**
 * MalwareProperties
 */
public class MalwareProperties {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "pid")

    private String pid;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "user")

    private String user;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "mod")

    private String mod;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "start_time")

    private OffsetDateTime startTime;

    public MalwareProperties withPid(String pid) {
        this.pid = pid;
        return this;
    }

    /**
     * 进程ID。
     * @return pid
     */
    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public MalwareProperties withUser(String user) {
        this.user = user;
        return this;
    }

    /**
     * 系统角色（例如:root，service）。
     * @return user
     */
    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public MalwareProperties withMod(String mod) {
        this.mod = mod;
        return this;
    }

    /**
     * 系统权限（例如：777，755）。
     * @return mod
     */
    public String getMod() {
        return mod;
    }

    public void setMod(String mod) {
        this.mod = mod;
    }

    public MalwareProperties withStartTime(OffsetDateTime startTime) {
        this.startTime = startTime;
        return this;
    }

    /**
     * 进程启动时间，格式ISO8601：YYYY-MM-DDTHH:mm:ss.ms+timezone。
     * @return startTime
     */
    public OffsetDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(OffsetDateTime startTime) {
        this.startTime = startTime;
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        MalwareProperties that = (MalwareProperties) obj;
        return Objects.equals(this.pid, that.pid) && Objects.equals(this.user, that.user)
            && Objects.equals(this.mod, that.mod) && Objects.equals(this.startTime, that.startTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(pid, user, mod, startTime);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class MalwareProperties {\n");
        sb.append("    pid: ").append(toIndentedString(pid)).append("\n");
        sb.append("    user: ").append(toIndentedString(user)).append("\n");
        sb.append("    mod: ").append(toIndentedString(mod)).append("\n");
        sb.append("    startTime: ").append(toIndentedString(startTime)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }

}
